package com.wash.shoes.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wash.shoes.domain.dto.CheckHistoryDto;
import com.wash.shoes.entity.CheckHistoryPo;
import com.wash.shoes.mapper.CheckHistoryMapper;
import com.wash.shoes.page.PageFactory;
import com.wash.shoes.service.CheckHistoryService;
import com.wash.shoes.util.HeaderUtil;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 核销记录 服务实现类
 * </p>
 *
 * @author ljg
 * @since 2024-10-01
 */
@Service
public class CheckHistoryServiceImpl extends ServiceImpl<CheckHistoryMapper, CheckHistoryPo> implements CheckHistoryService {

    @Override
    public Page<CheckHistoryPo> pageList(CheckHistoryDto checkHistoryDto) {
        Page page = PageFactory.defaultPage();

        List<CheckHistoryPo> dataList = baseMapper.pageList(page, checkHistoryDto, HeaderUtil.getShopIdStr());
        page.setRecords(dataList);
        return page;
    }

    @Override
    public CheckHistoryPo getByMtSerialNumbers(String mtSerialNumbers) {
        return this.baseMapper.getByMtSerialNumbers(mtSerialNumbers);
    }


}
